<?php 

require_once("../shared/connect.php");

$has_location = trim($_POST[input_address]) != "";

if ($has_location) {
	/*
	$sql = "INSERT INTO geocode (input_address, full_address, position)
			VALUES ('$_POST[input_address]', '$_POST[full_address]', '$_POST[position]');
	";
	*/

	$sql = "INSERT INTO geocode (input_address, full_address, lat, lng)
			VALUES ('$_POST[input_address]', '$_POST[full_address]', '$_POST[lat]', '$_POST[lng]');
	";

	$insert = mysql_query($sql) or die(mysql_error());
}

?>